<div class="container">
    <h1 id="pkg-overview">package sha256</h1>
    <p><code>import "crypto/sha256"</code>
    </p><p>sha256包实现了SHA224和SHA256哈希算法，参见FIPS 180-4。</p>
    
    
		
        
        
        
        
        
    
    <h2 id="pkg-constants">Constants </h2>
    <pre>const <span id="BlockSize">BlockSize</span> = 64</pre>
    <p>SHA224和SHA256的字节块大小。</p>
    <pre>const <span id="Size">Size</span> = 32</pre>
    <p>SHA256校验和的字节长度。</p>
    <pre>const <span id="Size224">Size224</span> = 28</pre>
    <p>SHA224校验和的字节长度。</p>
    <h2 id="Sum256">func <a href="https://github.com/golang/go/blob/master/src/crypto/sha256/sha256.go?name=release#177" title="View Source">Sum256</a> </h2>
    <pre class="funcdecl">func Sum256(data []<a href="builtin.htm#byte">byte</a>) [<a href="#Size">Size</a>]<a href="builtin.htm#byte">byte</a></pre>
    <p>返回数据的SHA256校验和。</p>
    <h2 id="New">func <a href="https://github.com/golang/go/blob/master/src/crypto/sha256/sha256.go?name=release#82" title="View Source">New</a> </h2>
    <pre class="funcdecl">func New() <a href="hash.htm">hash</a>.<a href="hash.htm#Hash">Hash</a></pre>
    <p>返回一个新的使用SHA256校验算法的hash.Hash接口。</p>
    <h2 id="Sum224">func <a href="https://github.com/golang/go/blob/master/src/crypto/sha256/sha256.go?name=release#185" title="View Source">Sum224</a> </h2>
    <pre class="funcdecl">func Sum224(data []<a href="builtin.htm#byte">byte</a>) (sum224 [<a href="#Size224">Size224</a>]<a href="builtin.htm#byte">byte</a>)</pre>
    <p>返回数据的SHA224校验和。</p>
    <h2 id="New224">func <a href="https://github.com/golang/go/blob/master/src/crypto/sha256/sha256.go?name=release#89" title="View Source">New224</a> </h2>
    <pre class="funcdecl">func New224() <a href="hash.htm">hash</a>.<a href="hash.htm#Hash">Hash</a></pre>
    <p>返回一个新的使用SHA224校验算法的hash.Hash接口。</p>
</div>